package com.heima.test8;

public class MyRunnable implements Runnable {
    int num;

    public MyRunnable(int i) {
        this.num = i;
    }

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName() + "开始" + this.num);
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println(Thread.currentThread().getName() + "结束" + this.num);
    }
}